<template>
    <div class="Child">
        <h2>子组件2</h2>
        <h3>电脑：{{ computer }}</h3>
        <h3>书：{{ book }}本</h3>
    </div>
</template>

<script lang="ts" setup name="Child2">
    import {ref,onUnmounted} from "vue"
    //数据
    let computer = ref("联想")
    let book = ref(6)
    defineExpose({computer,book})

</script>

<style scoped>
.Child{
    background-color: orange;
    width: 1000px;
    height: 200px;
}
</style>